package com.qd.common.panda.domain.entity.card.collect;

import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

/**
 * 领券
 * @author sjk
 */
@Data
public class ReceiveCardDTO {
    /**
     * 领劵ID
     */
    @NotBlank(message = "领劵ID不能为空")
    @Size(max = 50, message = "领劵ID长度不能超过{max}位")
    private String cid;
    /**
     * 关系ID
     */
    @NotBlank(message = "关系ID不能为空")
    @Size(max = 50, message = "关系ID长度不能超过{max}位")
    private String relationId;
    /**
     * 推广码
     */
    @NotBlank(message = "推广码不能为空")
    @Size(max = 50, message = "推广码长度不能超过{max}位")
    private String promotionCode;
    /**
     * 劵信息
     */
    @NotBlank(message = "劵信息不能为空")
    @Size(max = 50, message = "劵信息长度不能超过{max}位")
    private String cardMsgId;
    /**
     * 计划ID
     */
    @NotBlank(message = "计划ID不能为空")
    @Size(max = 50, message = "计划ID长度不能超过{max}位")
    private String planId;
    public void freeData(){
        this.cid = null;
        this.relationId = null;
        this.promotionCode = null;
        this.cardMsgId = null;
        this.planId = null;
    }
}